<div id="sidebar">
    <div class="sidebar_panel">
        <div class="title">+ Your Shopping Cart</div>
        <div class="sidebar_content">
            <div class="shopping_cart">
            {{include file="../12_cart.tpl"}}
            </div>
        </div>
    </div>

    <div class="sidebar_panel">
        <div class="title">+ Our Packages</div>
        <div class="sidebar_content">
            {{if isset($Data["Packages"])}}
                {{foreach $Data["Packages"] as $pk}}
                    <h2>+ <a href="{{base_url()}}package/{{$pk->Alias}}">{{$pk->PackageName|escape:'html'}}</a></h2>
                {{/foreach}}
            {{/if}}
        </div>
    </div>

    <div class="sidebar_panel">
        <div class="title">+ {{$Data["mad-rock-products"]->Name}}</div>
        <div class="sidebar_content">
            {{$Data["mad-rock-products"]->Value}}
        </div>
    </div>

    <div class="sidebar_panel">
        <div class="title">+ {{$Data["how-to-buy"]->Name}}</div>
        <div class="sidebar_content">
            {{$Data["how-to-buy"]->Value}}
        </div>
    </div>
</div>
        <script type="text/javascript">
            function addToCart(Alias){
                if(isrunning)return;
                var url,data;
                url="{{base_url()}}shop/addtocart/"+Alias;

                data={
                    
                }
                isrunning=true;
                debugAjax(url,data,function(result){
                    isrunning=false;
                    if(result.code>=0){
                        ShowNoticeDialogMessage(result.msg);
                        htmlAjax("{{base_url()}}shop/reloadyourcart", {}, $(".shopping_cart"));
                    }else{
                        ShowNoticeDialogMessage(result.msg);
                    }
                });
            }
            function removeToCart(Alias){
                if(isrunning)return;
                var url,data;
                url="{{base_url()}}shop/removetocart/"+Alias;

                data={
                    
                }
                isrunning=true;
                debugAjax(url,data,function(result){
                    isrunning=false;
                    if(result.code>=0){
                        $("tr.product."+Alias).remove();
                    }else{
                        ShowNoticeDialogMessage(result.msg);
                    }
                });
            }
            function addpkToCart(Alias){
                if(isrunning)return;
                var url,data;
                url="{{base_url()}}shop/addpktocart/"+Alias;

                data={
                    
                }
                isrunning=true;
                debugAjax(url,data,function(result){
                    isrunning=false;
                    if(result.code>=0){
                        ShowNoticeDialogMessage(result.msg);
                        htmlAjax("{{base_url()}}shop/reloadyourcart", {}, $(".shopping_cart"));
                    }else{
                        ShowNoticeDialogMessage(result.msg);
                    }
                });
            }
            function removepkToCart(Alias){
                if(isrunning)return;
                var url,data;
                url="{{base_url()}}shop/removepktocart/"+Alias;

                data={
                    
                }
                isrunning=true;
                debugAjax(url,data,function(result){
                    isrunning=false;
                    if(result.code>=0){
                        $("tr.package."+Alias).remove();
                    }else{
                        ShowNoticeDialogMessage(result.msg);
                    }
                });
            }
        </script>